package com.dragon.modules.yuegou.service.member;

import com.baomidou.mybatisplus.extension.service.IService;
import com.dragon.modules.yuegou.entity.member.WxOpenidRefEntity;
import com.dragon.modules.yuegou.enums.member.WxOpenidRefOpenIdType;
import com.dragon.modules.yuegou.model.member.WxOpenidRef;
import com.dragon.modules.yuegou.query.member.WxOpenidRefQuery;

/**
 * 会员openid关系表 服务接口
 *
 * @author pbuilder generated
 * @date 2019-03-19 08:59:40
 * @version 2.0
 */
public interface WxOpenidRefService extends IService<WxOpenidRefEntity> {

    /**
     * 新增或者修改信息
     * @param memberId
     * @param openid
     * @param unionid
     * @param appid
     * @param openIdType
     */
    void saveOrUpdate(String memberId, String openid, String unionid, String appid, WxOpenidRefOpenIdType openIdType);

    /**
     * 新增或者修改 支付宝会员信息
     * @param memberId
     * @param alipayAppid
     * @param appid
     * @param openIdType
     */
    void saveOrUpdate(String memberId,String alipayAppid,String appid,WxOpenidRefOpenIdType openIdType);

    /**
     * 退出登录
     * @param memberId
     * @param openIdType
     */
    void logout(String memberId,WxOpenidRefOpenIdType openIdType);

	WxOpenidRef getBy(String memberId, String appid, WxOpenidRefOpenIdType openIdType);
	
	WxOpenidRef getByAli(String aliAppid,String appId);

    WxOpenidRef getFirst(WxOpenidRefQuery query);
}